package com.jsy.user.dao;

import com.jsy.user.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

/****
 * @Author:www.jsy.com
 * @Description:User的Dao
 * @Date www.jsy.com
 *****/
public interface UserMapper extends Mapper<User> {

    /***
     * 增加用户积分
     * @param points 分数
     * @param username 用户名
     * @return 操作结果
     */
    @Update("UPDATE tb_user SET points=points+#{points} WHERE username=#{username}")
    Integer addPoints(@Param("points") Integer points, @Param("username") String username);
}
